package org.dromara.common.minio.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * 读取项目相关配置
 */

@Data
@Component
@ConfigurationProperties(prefix = "attachment.storage")
public class PathConfig {



    /** 上传路径 */
    private static String profile;

    public static String getProfile()
    {
      return profile;
    }

  public void setProfile(String profile)
  {
    PathConfig.profile = profile;
  }
  /**
   * 获取导入上传路径
   */
  public static String getImportPath()
  {
    return getProfile() + "/import";
  }

  /**
   * 获取头像上传路径
   */
  public static String getAvatarPath()
  {
    return getProfile() + "/avatar";
  }

  /**
   * 获取下载路径
   */
  public static String getDownloadPath()
  {
    return getProfile() + "/download/";
  }

  /**
   * 获取上传路径
   */
  public static String getUploadPath()
  {
    return getProfile() + "/upload";
  }

}
